<?php

class Default_Model_Advertise extends Zend_Db_Table_Abstract{
    public $_name="advertise";            
    public function getAllData(){
		$query = $this->select()
                        ->setIntegrityCheck(false)
                        ->from($this->_name);                         
        return $this->fetchAll($query);
    }    
    public function getDataVisible(){
        $query = $this->select()
                        ->setIntegrityCheck(false)
                        ->from($this->_name)
                        ->where('display = 1');                         
        return $this->fetchAll($query);        
    }
    public function getDataByAdvertiseId($id){
        $query=$this->select()
                        ->where("advertiseId=$id");                
        return $this->fetchRow($se);
          
    }    
    public function updateCat($data,$id){
        $this->update($data,"id=$id");          
    }
}